Prevent hotplug script execution from libxl if device is on a
different domain.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
int hotplug;
pid_t pid;
+ /*
+ * If device is attached from a driver domain don't try to execute
+ * hotplug scripts
+ */
+ if (aodev->dev->backend_domid != LIBXL_TOOLSTACK_DOMID)
+ goto out;
+
/* Check if we have to execute hotplug scripts for this device
* and return the necessary args/env vars for execution */
hotplug = libxl__get_hotplug_script_info(gc, aodev->dev, &args, &env,